package ObserverPattern;

import Model.Book;
import Model.User;

// 具体观察者类，用于表示用户观察者
class UserObserver implements Observer {
    private final User user;

    public UserObserver(User user) {
        this.user = user;
    }

    @Override
    public void update(Book book) {
        System.out.println("Notification: " + book.getTitle() + " is now available for " + user.getUsername() + ".");
    }


}
